package cn.itsource.product.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Product extends BaseDomain {
    //服务名
    private String name;
    //服务图片
    private String resources;
    //售价
    private BigDecimal saleprice;
    //成本价
    private BigDecimal costprice;
    //下架时间(后端生成)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date offsaletime = new Date();

    //上架时间(后端生成)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date onsaletime;
    //1 上架  0 下架
    private Integer state = 0;

    //创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createtime = new Date();
    //销量
    private Integer salecount = 0;

    //服务详情
    private ProductDetail productDetail;
}
